package com.lftea.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.stereotype.Service;

import com.lftea.dao.IProductUnitDAO;
import com.lftea.po.ProductUnit;
import com.lftea.service.IProductUnitService;

@Service("productUnitServiceImpl")
@RemotingDestination
public class ProductUnitServiceImpl implements IProductUnitService {

	@Resource(name = "productUnitDAOImpl")
	private IProductUnitDAO productUnitDAOImpl;
	
	@RemotingInclude
	public List<ProductUnit> findAll() {
		return productUnitDAOImpl.findAll();
	}
	
	@RemotingInclude
	public ProductUnit findById(long productUnitId) {
		return productUnitDAOImpl.findById(productUnitId);
	}

	@RemotingInclude
	public void remove(ProductUnit productUnit) {
		productUnitDAOImpl.remove(productUnit);
	}

	@RemotingInclude
	public void save(ProductUnit productUnit) {
		productUnitDAOImpl.save(productUnit);
	}

}
